Imports Common.Env


Public Class CamposDemo
    Inherits Abm
    Implements ICampoDemo

#Region "Declaraciones"

    Sub New()
        MyBase.New(Operador, Password, "wacampos", "wad_campos")
    End Sub

#End Region

#Region "Eventos"

    'Validaciones
    Private Sub Campos_Validando(ByRef cancela As Boolean, ByRef paramDataTable As DataTable) Handles MyBase.Validando

        Dim row As DataRow

        For Each row In paramDataTable.Rows
            If row.RowState <> DataRowState.Deleted AndAlso Not IsDBNull(("nm_campo")) Then
                If row("nm_campo").ToString.Substring(2, 1) <> "_" Then
                    cancela = True
                    row.SetColumnError("nm_campo", "El tercer digito debe ser un ""_"".")
                End If
            End If
        Next

    End Sub

#End Region

End Class

